echo "libreoffice default install to /opt/libreoffice , cmd-name is libreoffice6.2"

echo "uninsall old version libreoffice"
yum remove -y libreoffice-*

echo "unzip TAR & RPM..."

tar -zxvf libreoffice_rpm.tar.gz
tar -zxvf libreoffice_lib_deps_rpm.tar.gz

mkdir tmprpm

cp libreoffice_rpm/*.rpm tmprpm/

cp libreoffice_lib_deps_rpm/*.rpm tmprpm/

cd tmprpm/

echo "start install libreoffice6.2 ..."

yum -y localinstall *.rpm

echo "delete tmp folder"

cd ..
rm -rf libreoffice_rpm
rm -rf libreoffice_lib_deps_rpm
rm -rf tmprpm

echo "install libreoffice  successfully!"


